import { FormField } from '@/components'
import { ref } from 'vue'
export const fields: FormField[] = ref([
  {
    key: 'types',
    label: '风险类别',
    tag: 'MSelect',
    placeholder: '请选择',
    attrs: {
      options: [],
      clearable: true
    }
  },
  {
    key: 'rectifyFlag',
    label: '是否整改',
    tag: 'MSelect',
    placeholder: '请选择',
    attrs: {
      options: [
        {
          label: '是',
          value: 1
        },
        {
          label: '否',
          value: 0
        }
      ],
      clearable: true
    }
  }
])

export const dialogFields: FormField[] = ref([
  {
    key: 'types',
    label: '问题风险类型',
    tag: 'MSelect',
    placeholder: '请选择',
    attrs: {
      options: []
    },
    validateRules: [
      {
        required: true,
        message: '请输入',
        trigger: 'change'
      }
    ]
  },
  {
    key: 'files',
    label: '佐证材料',
    tag: 'MBackingMaterial',
    attrs: {
      dateFormat: 'YYYY-MM-DD'
    },
    validateRules: [
      {
        required: false,
        message: '请输入',
        trigger: 'change'
      }
    ]
  },
  {
    key: 'describes',
    label: '问题描述',
    tag: 'ElInput',
    attrs: {
      rows: 5,
      type: 'textarea'
    },
    validateRules: [
      {
        required: true,
        message: '请输入',
        trigger: 'change'
      }
    ]
  },
  {
    key: 'requirement',
    label: '整改要求',
    tag: 'ElInput',
    attrs: {
      rows: 5,
      type: 'textarea'
    },
    validateRules: [
      {
        required: true,
        message: '请输入',
        trigger: 'change'
      }
    ]
  }
])
